﻿@model IEnumerable<HelloMinasan.Domain.QA>
@{
    var page = (int)ViewData["page"];
    var total = (int)ViewData["total"];
    var user = ViewData["User"];
}

@{
    ViewBag.Title = "ShowMyQuestions";
}

@*QA:
<input id="criteria" type="text" value="@ViewData["criteria"]" onblur="javascript:OnCriteria(1, true);" />

<input id="lastedCriteria" type="hidden"  value="@ViewData["criteria"]" />*@

<div>User: 
    <a href="../QA/Index" title="@user"><b><u>@user</u></b></a>
</div>
<br />
<br />
<div class="postlist">
    <li class="postbitlegacy">
        <div class="contentSection">
            <div style="display: table; width: 100%">
                <span size="6" style="float: left;">Sreach</span>
                <span style="float: right;"></span>
            </div>
        </div>
        @*phần câu hỏi *@
        <div>
            @foreach (var item in Model)
            {
            <table width="100%" class="contentQAContainer">
                <tr>
                    <td width="50%" valign="top" style="padding-left: 5px;">
                        <div>
                        @*hiện thị câu hỏi*@
                         @if(item.IsLock == false)
                            {
                                <img src="@Url.Content("~/Content/Images/QA_thread_hot_new.png")" width="40" height="37" />
                            }
                            else
                            {
                                <img src="@Url.Content("~/Content/Images/QA_thread_hot_lock_new.png")" width="40" height="37" />
                            }
                            <a href ="../QA/Details/@item.QuestionId" title="@item.QuestionTitle"> 
                                <font size="4">@item.QuestionTitle</font>
                            </a>
                        </div>
                    </td>

                    <td width="25%" valign="top" style="padding-left: 5px;">
                       <div><font size="4">View: @item.SumView</font> </div> 
                       <div><font size="4">Ansert: @item.SumAnsert</font> </div>
                    </td>

                    <td width="25%" valign="top" style="padding-right: 5px;">
                        <div>From:</div>
                        <div><a href="../QA/Index" title="@item.QuestionCatagory"></a> @item.QuestionCatagory</div>
                    </td>
                </tr>
            </table>
            }
        </div>
    </li>
</div>


<div style="margin: 1.5em;">
    @if (page > 1)
    {
        <a href="#" onclick="javascript:OnCriteria(@(page - 1), false);">Previous</a>
    }
    &nbsp;@ViewData["page"]
    of
    @total
    pages&nbsp;
    @if (page < total)
    {
        <a href="#" onclick="javascript:OnCriteria(@(page + 1), false);">Next</a>
    }
</div>

